/*
 * elf_basic_types.h
 *
 *  Created on: Sep 2, 2012
 *      Author: aortegag
 */

#ifndef ELF_BASIC_TYPES_H_
#define ELF_BASIC_TYPES_H_

typedef unsigned int		Elf32_Addr;
typedef unsigned short int	Elf32_Half;
typedef unsigned int		Elf32_Off;
typedef int					Elf32_Sword;
typedef unsigned int		Elf32_Word;

typedef unsigned long long 	Elf64_Addr;
typedef unsigned short int	Elf64_Half;
typedef unsigned long long 	Elf64_Off;
typedef int					Elf64_Sword;
typedef unsigned int		Elf64_Word;
typedef long long  			Elf64_Sxword;
typedef unsigned long long	Elf64_Xword;


//! Elf error/success/notification codes
typedef enum elf_code{
	ELF_SUCCESS = 0,
	/** GENERAL ERROR CODES **/
	ELF_ERROR,
	/** ELF Header ERROR CODES **/
	ELF_EHDR_INVALID_ERROR,
	ELF_EHDR_MAGIC_NUMBER_ERROR,
	ELF_EHDR_FILE_CLASS_ERROR,
	ELF_EHDR_DATA_ENCODING_ERROR,
	ELF_EHDR_FILE_TYPE_ERROR,
	ELF_EHDR_PROCESSOR_TYPE_ERROR,
	ELF_EHDR_VERSION_ERROR,
	ELF_EHDR_EIDENT_VERSION_ERROR,
	/** Section Header error codes **/
	ELF_SHDR_INVALID_ERROR,
	ELF_SHDR_ALLOC_ERROR,
	ELF_SHDR_TABLE_NOT_FOUND, //!< Not a real error, there was none.
	ELF_SHDR_READ_ERROR,
	/** Program Header error codes **/
	ELF_PHDR_TABLE_NOT_FOUND, //!< Not a real error, there was none.
	ELF_PHDR_ALLOC_ERROR,
	ELF_PHDR_READ_ERROR,
	ELF_PHDR_INVALID_ERROR

}elf_code_t;


/**
 * \defgroup
 * @{
 */

/**@}*/

/**
 * \defgroup
 * @{
 */

/**@}*/

/**
 * \defgroup
 * @{
 */

/**@}*/


#endif /* ELF_BASIC_TYPES_H_ */
